home *** CD-ROM | disk | FTP | other *** search
/ Creative Computers / Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso / shareware / telecom / ncomm / script.doc / script.doc
Text File  |  1994-11-17  |  18KB  |  592 lines

  1. The NComm V1.9 scriptlanguage
  2. =============================
  3.  
  4. A scriptfile is an ASCII textfile that consists of different commands,
  5. separated by  one or more  linefeeds.  Edit the  scriptfiles with your
  6. favourite  editor.  Only  one  command is  allowed per line, but blank
  7. lines are also OK. A line can consist of blanks before the command and
  8. between parameters.  Comments can be added by entering a semicolon.  A
  9. label is marked with a colon as its last character, e.g. "quit:".  The
  10. script  commands  are case independent,  but strings within quotes are
  11. not.
  12.  
  13. Scripts  are mainly used to automate logons, or to companion you while
  14. you  are  online.   Scripts  can also perform more advanced functions,
  15. like  grabbing  mail  and perhaps posting it on another board (or even
  16. printing it!).  You set the limits...
  17.  
  18. Two example  scripts and  one Host-Mode script have been included with
  19. the NComm package.  Take a look at them if you don't understand how to
  20. use the commands.
  21.  
  22. Important:   The  filenames  specified in a scriptfile are relative to
  23. the   current   directory,   NOT   the  default  upload  and  download
  24. directories!
  25.  
  26.  
  27. Summary of Script commands
  28. --------------------------
  29.  
  30.         ASCSEND
  31. Starts ASCII text send of the filename given. Example:
  32.  
  33. ASCSEND "df1:text/msg"
  34.  
  35. The  TIMEOUT command also concerns ASCSEND.  If ASCSEND is halted by a
  36. ^S  and  no  ^Q  has  been  received within the timelimit specified by
  37. TIMEOUT,  the  script  will  go on with the next command.  XON will be
  38. turned on before ASCSEND.
  39.  
  40. ----------------------------------------------------------------------
  41.  
  42.         BEEP
  43. Will  cause  an audible 'beep' of the terminal and / or will flash the
  44. screen  and / or will bring the screen to front, depending on what you
  45. have  configured  in  the  SCREEN  menu.   Nothing is sent through the
  46. serial port.
  47.  
  48. ----------------------------------------------------------------------
  49.  
  50.         BREAK
  51. Sends a break to the host machine. Equivalent to SEND "\l".
  52.  
  53. ----------------------------------------------------------------------
  54.  
  55.         CAPTURE
  56. Toggles ASCII capture on/off. Examples:
  57.  
  58. CAPTURE "filename"
  59. Will  open the capture file and turn on capture.  It will be opened in
  60. 'append mode' if the file exists...
  61.  
  62. CAPTURE SUS
  63. Will suspend capture.  Capture can be turned on again with the command
  64. CAPTURE ON
  65.  
  66. CAPTURE OFF
  67. Will  turn  capture off and close the file.  The file cannot be opened
  68. again with the CAPTURE ON command.
  69.  
  70. ----------------------------------------------------------------------
  71.  
  72.         CD
  73. Problems  occur  when  the "CD" command is used with the CLI function.
  74. The  "CD"  command  has  therefore  been  made a special function.  It
  75. simply  changes  the directory that is to be used for commands started
  76. with the "CLI" function.
  77.  
  78. Example:
  79.  
  80. CD "RAM:"       ;Will change the current working directory to 'RAM:'
  81.  
  82. ----------------------------------------------------------------------
  83.  
  84.         CHAIN
  85. Will start a new script.  The control will never return to the calling
  86. script.   This  is  useful  when  you need extremely long scripts that
  87. won't fit in memory.
  88.  
  89. Example:
  90.  
  91. CHAIN "NComm:ReadNews.script"
  92.  
  93. ----------------------------------------------------------------------
  94.  
  95.         CLI
  96. Will  execute  a program or a command.  The output from these programs
  97. and  commands  will  occur  in the NComm window.  This command will be
  98. relative to the directory you were standing in when you started NComm.
  99.  
  100. Please  note;  Current  Directory can not be set with the CLI command,
  101. probably  due  to  problems with the Amiga operating system.  The "CD"
  102. function must therefore be used for this purpose.
  103.  
  104. Examples:
  105.  
  106. CLI "dir dh0:comms"
  107. CLI "type ram:foo.bar"
  108. CLI "pkax ram:grabfile.arc"
  109.  
  110. ----------------------------------------------------------------------
  111.  
  112.         CLRSTACK
  113. This  command  clears  the  RETURN  stack,  i.e.   it  forgets  active
  114. subroutine  calls (gosubs).  The command is handy at error situations,
  115. when  you  wish to "jump out" of the program and start over again, for
  116. example in conjunction with TIMEOUT or WHEN commands.
  117.  
  118. ----------------------------------------------------------------------
  119.  
  120.         CONFIG
  121. Will read a new configuration file.  Example:
  122.  
  123. CONFIG "NComm:MBBS.config"
  124.  
  125. ----------------------------------------------------------------------
  126.  
  127.         CONVERSE
  128. Will wait for a prompt from the host machine and answer it.
  129.  
  130. Examples:
  131.  
  132. CONVERSE "Enter your name:" "Name\n"   ;Waits for 'Enter your name:'
  133. CONVERSE "enter your password:" "\p\n" ;Sends phonebook password + CR
  134. CONVERSE "Command:" "G\n"              ;Sends 'G' and newline
  135.  
  136. ----------------------------------------------------------------------
  137.  
  138.         DELAY
  139. The  script  program  will take a break.  The program will function as
  140. normal.
  141.  
  142. Examples:
  143.  
  144. DELAY 5                 ;Wait 5 seconds
  145. DELAY UNTIL 12:00       ;Wait until 12 o'clock.
  146.  
  147. ----------------------------------------------------------------------
  148.  
  149.         DIAL
  150. Will  dial  one  or  more  phonenumbers.  Can also dial entries in the
  151. phonebook.   If  you  choose  to  dial  phonenumbers,  use the command
  152. 'DIAL#'.   The  numbers must be placed within quotation marks.  If you
  153. choose to dial more than one number, the numbers can be separated by a
  154. comma.
  155.  
  156. Examples:
  157.  
  158. DIAL# "454143"
  159. DIAL# "380949", "493210", "454143"
  160.  
  161. Named  entries  in  the  phonebook  can  be  dialled by specifying the
  162. boardname within quotation marks.  You only have to specify the number
  163. of  letters  required  to  separate  the  board  from the others.  The
  164. name is not case sensitive.
  165.  
  166. Examples:
  167.  
  168. DIAL "AmigaBBS"
  169. DIAL "rode", "Mike's", "media"
  170. DIAL "Rodeløkka (M)BBS"
  171.  
  172. ----------------------------------------------------------------------
  173.  
  174.         DLWHEN
  175. Deletes  the last defined WHEN command.  Repeated usage will succesive
  176. delete the "previous" WHEN command.  See:  WHEN.
  177.  
  178. ----------------------------------------------------------------------
  179.  
  180.         DOWNLOAD
  181. Will download a file from the host machine.  The protocol specified in
  182. the  TRANSFER  menu will be used as long as nothing else is specified.
  183. If you want to specify another protocol, enter a comma and a letter.
  184. The filename is "dummy" when using Zmodem.
  185.  
  186. X == Xmodem, Y == Ymodem, B == Ymodem-B, G == Ymodem-G, Z == Zmodem.
  187.  
  188. Examples:
  189.  
  190. DOWNLOAD "df1:junk"             ;Will use the default protocol
  191. DOWNLOAD "df0:trash",X          ;Will always use Xmodem
  192.  
  193. ----------------------------------------------------------------------
  194.  
  195.         DTENTHS
  196. This  is  a much more precise delay command, but only use this command
  197. when  this  accuracy is needed, since it will lock up the system.  The
  198. DTENTHS parameter is the number of tenth seconds to wait.
  199.  
  200. Examples:
  201.  
  202. DTENTHS 2       ;Wait 0.2 seconds
  203. DTENTHS 16      ;Wait 1.6 seconds
  204.  
  205. ----------------------------------------------------------------------
  206.  
  207.         DUMP
  208. Command  for debugging a script.  It dumps a list of all variables and
  209. what they contain, on screen.
  210.  
  211. ----------------------------------------------------------------------
  212.  
  213.         DWHENS
  214. Will disable all previously used WHEN commands. See: WHEN.
  215.  
  216. ----------------------------------------------------------------------
  217.  
  218.         ECHO
  219. This  command defines if characters read by the INPUT command shall be
  220. echoed.   ECHO ON should be used when input is read from a user in the
  221. other  end. ECHO OFF should be used when input is read from a Bulletin
  222. Board  System, or when the user is not supposed to see what he writes.
  223.  
  224. ECHO  should  be  turned  ON  if the functions ASCSEND and MSGSEND are
  225. supposed  to  echo text locally.  The output from the CLI command will
  226. be sent to the serial port if ECHO has been turned on.
  227.  
  228. ----------------------------------------------------------------------
  229.  
  230.         END
  231. Will  stop  the  execution  of the script.  This command is especially
  232. useful in front of subroutines.
  233.  
  234. Example:
  235.  
  236. WHEN "Read>" GOSUB next
  237. WAIT "No more unread."
  238. END
  239.  
  240. Next: SEND "\n"
  241.       MESSAGE "(Skipping to next unread)\n"
  242.       RETURN
  243.  
  244. ----------------------------------------------------------------------
  245.  
  246.         GOSUB
  247. Will  call  a  named subroutine.  Useful when you want to use the same
  248. command  many  times  within  a  script, or in connect